﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="optionCourse.aspx.cs" Inherits="学生成绩查询及选课系统.student.optionCourse" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <title>学生成绩查询及选课系统</title>
        <meta name="renderer" content="webkit|ie-comp|ie-stand"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="stylesheet" href="../css/font.css"/>
        <link rel="stylesheet" href="../css/xadmin.css"/>
        <link href="./StyleSheet1.css" rel="stylesheet" />
        <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
        <script src="../lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="../js/xadmin.js"></script>
</head>
     
    <body class="index">
        
        <!-- 顶部开始 -->
        <div class="container">
            <div class="logo">
                <a href="./MainPage.aspx">学生成绩查询及选课系统</a></div>
            <ul class="layui-nav left fast-add" lay-filter="">
                <li class="layui-nav-item">
                    <%--<a href="javascript:;">+新增</a>--%>
                    <dl class="layui-nav-child">
                        <!-- 二级菜单 -->
                        <%--<dd>
                            <a onclick="xadmin.open('最大化','http://www.baidu.com','','',true)">
                                <i class="iconfont">&#xe6a2;</i>弹出最大化</a></dd>
                        <dd>
                            <a onclick="xadmin.open('弹出自动宽高','http://www.baidu.com')">
                                <i class="iconfont">&#xe6a8;</i>弹出自动宽高</a></dd>
                        <dd>
                            <a onclick="xadmin.open('弹出指定宽高','http://www.baidu.com',500,300)">
                                <i class="iconfont">&#xe6a8;</i>弹出指定宽高</a></dd>--%>
                    </dl>
                </li>
            </ul>

            <ul class="layui-nav right" lay-filter="">

                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <asp:Label ID="username" runat="server" Text=""></asp:Label></a>
                    <dl class="layui-nav-child">
                        <!-- 二级菜单 -->
                        <dd>
                            <a onclick="xadmin.open('我的已选课程','selectedCourse.aspx'),500,300">
                                <i class="iconfont">&#xe6a8;</i>我的已选课程</a>
                        </dd>
                        <dd>
                            <a href="../login.aspx">退出登录</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item to-index">
                    <a href="../MainPage.aspx">前台首页</a></li>
            </ul>
            
        </div>
       <div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">演示</a>
            <a>
              <cite>导航元素</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <%--<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>--%>
          </a>
        </div>
          
 <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                  <div class="layui-card-body ">
                        <form id="form1" runat="server">
                             <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                             <asp:Label ID="Label1" CssClass="layui-icon" runat="server" Text="选课时间为6月12号到7月10号，请抓紧选课"></asp:Label>
                        <br />
                        <br />
                        <br />
                        <br />
                        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" OnItemCommand="Repeater1_ItemCommand">
                            <HeaderTemplate>
                                 <asp:Button ID="Button2" runat="server" Text="刷新" CssClass="layui-btn" OnClick="Button2_Click" />                                                       
                                <table  class="layui-table layui-form" >
                                   <thead>
                                       <tr>
                                           <td>课程ID</td>
                                           <td>课程名</td>
                                           <td>教师号</td>
                                           <td>学分	</td>
                                           <td>课程性质</td>
                                           <td>剩余数量</td>
                                           <td>操作</td>
                                       </tr>
                                   </thead> 
                    
                            </HeaderTemplate>
                            <ItemTemplate>        
                                    <tbody>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="cno" runat="server" Text='<%#Eval("课程ID")%>'></asp:Literal>
                                            </td>
                                            <td>
                                                <asp:Label ID="cname" runat="server" Text='<%#Eval("课程名") %>'></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="tno" runat="server" Text='<%#Eval("教师号") %>'></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="tname" runat="server" Text='<%#Eval("学分") %>'></asp:Label>
                                            </td>
                                            <td>
                                                 <asp:Label ID="cproperties" runat="server" Text='<%#Eval("课程性质") %>'></asp:Label>
                                            </td>
                                            <td>
                                               <asp:Label ID="cCount" runat="server" Text='<%#Eval("剩余") %>'></asp:Label>
                                            </td>
                                            <td>
                                                
                                                <asp:Button ID="Button1" CssClass="layui-btn"  runat="server" Text="选课" CommandArgument='<%#Eval("课程ID")%>' CommandName="chooseCourse"  />
                                                <%--<asp:Button ID="Button2" CssClass="layuilayui-unselect layui-form-switch layui-form-onswitchbtn"  runat="server" Text="选课" CommandArgument='<%#Eval("课程ID")%>' CommandName="chooseCourse"  />--%>
                                                <asp:Button ID="cancel" runat="server" CssClass="layui-btn" BackColor="Red"  Text="取消" CommandArgument='<%#Eval("课程ID")%>' CommandName="cancelCourse" />
                                            </td>
                                           <%-- <td>
                                                <asp:LinkButton ID="LinkButton1" CssClass="layui-btn" OnClick="LinkButton1_Click"  runat="server">选课</asp:LinkButton>
                                            </td>--%>
                                        </tr>
                                    </tbody>
                            </ItemTemplate>
                            <FooterTemplate>
                                 </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:C#StuentManageConnectionString %>" SelectCommand="proc_AllOptionCurse" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                             <asp:Label ID="Label2" runat="server"  Font-Size="Larger" ForeColor="#ff0000" ></asp:Label>
                        <br />
                        <br />   
                       </form>
                      </div>

                       </div>
                </div>
            </div>
        </div> 


    </body>
</html>






